import { CacheInterceptor, CacheModule, Module } from '@nestjs/common';
import { APP_INTERCEPTOR } from '@nestjs/core';
import { WupingBusController } from './wupingbus.controller';
import { WupingBusService } from './wupingbus.service';

@Module({
  imports: [CacheModule.register({ ttl: 1 })],
  controllers: [WupingBusController],
  providers: [
    WupingBusService,
    {
      provide: APP_INTERCEPTOR,
      useClass: CacheInterceptor,
    },
  ],
})
export class WupingBusModule {}
